<template>
    <el-container class="boxmain">
        <el-header>
            <Head :userinfo="userinfo"/>
           
        </el-header>
        <el-container  class="submain">
            <el-aside width="200px"> <Menu :userinfo="userinfo"/></el-aside>
            <el-container>
                <el-main class="boxindex">
                     <Snow />
                    <router-view></router-view>
                    
                </el-main>
                 <el-footer><Foot /></el-footer>
            </el-container>
        </el-container>
    </el-container>
</template>

<script>
import Head from "@/components/head.vue"
import Foot from "@/components/foot.vue"
import Menu from "@/components/sidemenu.vue"
import Snow from "@/components/snow.vue"
import {operation} from "@/api"


export default {
    components:{
        Head,
        Foot,
        Menu,
        Snow
    },
    data(){
        return {
            userinfo:null
        }
    },
    mounted(){
        operation({
            mobile:localStorage.getItem("mobile")
        }).then(res=>{
            if(res.type){
                console.log(res.result)
                this.userinfo = res.result
                sessionStorage.setItem("roleid",res.result.roleid) 
                sessionStorage.setItem("username",res.result.username) 
                 sessionStorage.setItem("avatar",res.result.avatar) 
            }
        })
    

    
    }
 
}
</script>

<style lang="scss" scoped>
   
    .boxmain{
        width:100%;
        height:100%;
        width:100vw;
        height:100vh;
        background-image: url(https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1600001363665&di=1b77d4e56e2a41b2fd8fff2abfd7b2db&imgtype=0&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20171013%2Ffec49f59b98041a4a16886893447f746.jpeg) ;
        background-size: 100% 115%; 
        background-repeat: no-repeat;
        background-position: 0 0;
    }
    .el-aside{
        height: 100%;
    }
    .boxindex{
        background: #fff;
    }
    el-foot{
        width: 100%;
           height: 20px;
    }
</style>